<?php

namespace App\Http\Requests\Api;

use Illuminate\Foundation\Http\FormRequest;

class MemberRequest extends FormRequest
{
    public function rules()
    {
        return [
            'sex' => 'required|integer|between:1,2',
            'sign' => 'max:20'
        ];
    }

    public function messages()
    {
        return [
            'sex.required' => '性别必填',
            'sex.numeric' => '性别参数格式错误',
            'sex.between' => '性别参数格式错误',
            'sign.max' => '个性签名字数不能超过20个字',
        ];
    }
}
